# -*- coding: utf-8 -*-
# @Time : 2024/6/11 9:52 PM 
# @Author : Wayne
# @Email : 1
# @File : url_encode.py
# @Project : young_python_demo
# @DESCRIPTION :
from urllib.parse import quote_plus

app_key = "Ew2aIFaH"
app_signature = "YzllMzM1OTIyNWNkNjE1NDYwNGQ1ODZjZTczM2IxOTg2MmRhN2JkYTI5Mjc5MWY2Y2M0NmMxZDU1ODg1YmZkYw=="

# 第一次URL编码
app_key_encoded_once = quote_plus(app_key).upper()
app_signature_encoded_once = quote_plus(app_signature).upper()

# 第二次URL编码
app_key_encoded_twice = quote_plus(app_key_encoded_once).upper()
app_signature_encoded_twice = quote_plus(app_signature_encoded_once).upper()

print("Encoded app_key:", app_key_encoded_twice)
print("Encoded app_signature:", app_signature_encoded_twice)